package com.yequan.work;

import org.apache.commons.lang3.StringUtils;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * @author yequan
 * @date 2021/04/25 10:42
 **/
public class PassengerTags {

    public static void main(String[] args) {
        System.out.println(getPassengerTagsByUserId());
    }

    public static String getPassengerTagsByUserId() {

        String fullInfoTags = "";
        if (StringUtils.isEmpty(fullInfoTags)) {
            return null;
        }
        Map<String, Object> fullTagMap = JsonMapper.json2Map(fullInfoTags);
        if (null == fullTagMap || 0 == fullTagMap.size()) {
            return null;
        }
        Set<String> fullTagMapKeySet = fullTagMap.keySet();
        Iterator<String> iterator = fullTagMapKeySet.iterator();
        StringBuilder sb = new StringBuilder();
        while (iterator.hasNext()) {
            String key = iterator.next();
            if (!"".equals(key) && !"null".equals(key)) {
                sb.append(key).append("!");
            }
        }
        return sb.toString();
    }

}
